package com.zhangmeng.online.exam.utils;

import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @author zm
 * @date 2025/3/14 16:36
 * @version: 1.0
 */
public class PageUtils {

    public static int getPageNum(Integer pageNum){
        if (pageNum == null){
            pageNum = 0;
        }else if (pageNum <= 0){
            pageNum = 0;
        }else {
            pageNum = pageNum - 1;
        }
        return pageNum;
    }

    public static void main(String[] args) {
        BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();
        String password = encoder.encode("123456");
        System.out.println(password);
    }
}
